<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.6/iconfont.css" rel="stylesheet"
	type="text/css" />
<link href="lib/webuploader/0.1.5/webuploader.css" rel="stylesheet"
	type="text/css" />
<link href="css/common.css" rel="stylesheet" type="text/css" />
<link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.css"
	rel="stylesheet" type="text/css" />
<link href="lib/region/css/city-picker.css" rel="stylesheet"
	type="text/css" />
<link href="lib/region/css/main.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>新增红包广告</title>
</head>
<body>
	<div class="pd-20">
		<form action="<%=path%>/backstage/bonus-add" method="post"
			class="form form-horizontal" id="form-u_bonus-add">
			<input type="hidden" id="id" name="id" value='${u_bonus.id}' />

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">企业主：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<span class="select-box"><select name="ent_id"
						class="select" datatype="*" nullmsg="请选择企业主">
							<c:forEach items="${entrepreneurs}" var="entrepreneur">
								<option value="${entrepreneur.id}_${entrepreneur.user_id}">${entrepreneur.corp_fname}</option>
							</c:forEach>
					</select></span>
				</div>
			</div>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">投放类型：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<span class="select-box"><select name="resource_type"
						class="select" datatype="n" nullmsg="请选择类型"
						onchange="changeType(this.value)">
							<option value="0"
								<c:if test="${u_bonus.type==1}">selected="selected"</c:if>>图文</option>
							<option value="1"
								<c:if test="${u_bonus.type==2}">selected="selected"</c:if>>视频</option>
					</select></span>
				</div>
			</div>
			<div id="regiondiv">
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-3">投放地区：</label>
					<div class="formControls col-xs-8 col-sm-5">
						<input id="city-picker" class="form-control" readonly
							name="regioninfo" type="text"
							value="<c:if test="${u_bonus.advert.province!=''}">${u_bonus.advert.province}</c:if><c:if test="${u_bonus.advert.city!=''}">/${u_bonus.advert.city}</c:if><c:if test="${u_bonus.advert.area!=''}">/${u_bonus.advert.area}</c:if>"
							data-toggle="city-picker">
					</div>
					<div class="formControls col-1">
						<button onclick="addregion()" type="button">添加</button>
					</div>
				</div>
			</div>


			<div class="row cl" id="range" style="display: block;">
				<label class="form-label col-xs-4 col-sm-3">投放范围：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<div class="row cl">
						<label class="form-label col-2">定位：</label>
						<div class="formControls col-3">
							<input type="text" class="input-text" value="" placeholder="经度"
								style="width: 100px;" readonly="readonly" id="longitude"
								name="longitude">
						</div>
						<div class="formControls col-3">
							<input type="text" class="input-text" value="" placeholder="纬度"
								style="width: 100px;" readonly="readonly" id="latitude"
								name="latitude">
						</div>
						<div class="formControls col-1">
							<a href="javascript:;" onclick="getlnglat()">定位</a>
						</div>
					</div>
					<div class="row cl">
						<label class="form-label col-2">范围：</label>
						<div class="formControls col-3">
							<input type="text" class="input-text" value="" placeholder=""
								id="distance_range" name="distance_range" style="width: 100px;">
						</div>
						<div class="formControls col-1">米</div>
					</div>
				</div>
			</div>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">平台收费标准：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<input type="text" readonly="readonly"
						class="input-text input-readyonly" value="0.3" placeholder=""
						id="oneclickprice">
				</div>
				<div class="formControls col-1">元/次</div>
			</div>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">投放总金额：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<input type="text" class="input-text" value="${u_bonus.summy}"
						placeholder="" id="summy" name="summy" datatype="n" nullmsg="不能为空">
				</div>
				<div class="formControls col-1">元</div>
			</div>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">实际点击次数：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<input type="text" class="input-text input-readyonly"
						readonly="readonly" value="" placeholder="" id="clickcount"
						name="">
				</div>
				<div class="formControls col-1">次</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">广告曝光次数：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<input type="text" class="input-text input-readyonly"
						readonly="readonly" value="${u_bonus.advert.show_times}"
						placeholder="" id="show_times" name="show_times">
				</div>
				<div class="formControls col-1">次</div>
			</div>

			<hr class="hr mt10" />

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">广告标题：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<input type="text" class="input-text" value="${u_bonus.title}"
						placeholder="" id="" name="title">
				</div>
			</div>
			<c:choose>
				<c:when test="${u_bonus.advert.resource_type==0}">
					<div id="imgresources">
						<div class="row cl">
							<label class="form-label col-xs-4 col-sm-3">缩略图：</label>
							<div class="formControls col-xs-8 col-sm-5">
								<div id="fileList_covers" class="uploader-list">
									<c:if test="${!empty u_bonus.advert.covers}">
										<div class="file-item thumbnail upload-state-done">
											<img style="width: 179px; height: 179px;"
												src="${u_bonus.advert.covers}" />
											<div class="info"></div>
										</div>
									</c:if>
								</div>
								<div id="filePicker_covers">选择图片</div>
								<input type="hidden" class="input-text"
									value="${u_bonus.advert.covers}" placeholder="" id="covers"
									name="covers">
							</div>
						</div>
						<div class="row cl">
							<label class="form-label col-xs-4 col-sm-3">轮播图：</label>
							<div class="formControls col-xs-8 col-sm-5">
								<div id="fileList_resources" class="uploader-list">
									<c:if test="${!empty u_bonus.advert.advert_resources}">
										<c:forEach items="${u_bonus.advert.advert_resources}"
											var="resource">
											<div class="file-item thumbnail upload-state-done">
												<img style="width: 179px; height: 179px;"
													src="${resource.resource_url}" />
												<div class="info">
													<input type="hidden" value="${resource.resource_url}"
														name="resources" />
												</div>
											</div>
										</c:forEach>
									</c:if>
								</div>
								<div id="filePicker_resources">选择图片</div>
							</div>
						</div>
					</div>
				</c:when>
				<c:otherwise>
					<div id="videourl" class="row cl" style="display: block;">
						<label class="form-label col-xs-4 col-sm-3">视频：</label>
						<div class="formControls col-xs-8 col-sm-5">
							<div id="fileList_video" class="uploader-list">
								<c:if test="${!empty u_bonus.advert.covers}">
									<div class="file-item thumbnail upload-state-done">
										<img style="width: 179px; height: 179px;"
											src="${u_bonus.advert.covers}?vframe/png/offset/3" />
										<div class="info"></div>
									</div>
								</c:if>
							</div>
							<div id="filePicker_video">选择视频</div>
							<input type="hidden" class="input-text" value="" placeholder=""
								id="video" name="videoresource">
						</div>
					</div>
				</c:otherwise>
			</c:choose>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">祝福语：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<input type="text" class="input-text" value="${u_bonus.bless_word}"
						placeholder="至少10个字以上" id="" name="bless_word" datatype="*"
						nullmsg="不能为空">
				</div>
			</div>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">广告开始时间：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<input type="text" class="input-text Wdate"
						onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
						value="${u_bonus.advert.start_time}" placeholder="" id=""
						name="start_time" datatype="*" nullmsg="不能为空">
				</div>
			</div>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">广告结束时间：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<input type="text" class="input-text Wdate"
						value="${u_bonus.advert.end_time}"
						onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" placeholder="" id=""
						name="end_time" datatype="*" nullmsg="不能为空">
				</div>
			</div>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">最大红包金额：</label>
				<div class="formControls col-xs-4 col-sm-5">
					<input type="text" class="input-text" value="${u_bonus.max_money}"
						placeholder="" id="" name="max_money" datatype="*" nullmsg="不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">最小红包金额：</label>
				<div class="formControls col-xs-4 col-sm-5">
					<input type="text" class="input-text" value="${u_bonus.min_money}"
						placeholder="" id="" name="min_money" datatype="*" nullmsg="不能为空">
				</div>
			</div>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">有金额红包个数：</label>
				<div class="formControls col-xs-4 col-sm-5">
					<input type="text" class="input-text"
						value="${u_bonus.count_charge}" placeholder="" id=""
						name="count_charge">
				</div>
			</div>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">无金额红包个数：</label>
				<div class="formControls col-xs-4 col-sm-5">
					<input type="text" class="input-text" value="${u_bonus.count_free}"
						placeholder="" id="" name="count_free">
				</div>
			</div>

			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
					<button onClick="u_bonus_save_submit();"
						class="btn btn-primary radius" type="submit">
						<i class="Hui-iconfont">&#xe632;</i> 保存并提交
					</button>
					<button onClick="layer_close();" class="btn btn-default radius"
						type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
				</div>
			</div>
		</form>
	</div>
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
	<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="lib/icheck/jquery.icheck.min.js"></script>
	<script type="text/javascript"
		src="lib/Validform/5.3.2/Validform.min.js"></script>
	<script type="text/javascript"
		src="lib/webuploader/0.1.5/webuploader.min.js"></script>
	<script type="text/javascript"
		src="lib/ueditor/1.4.3/ueditor.config.js"></script>
	<script type="text/javascript"
		src="lib/ueditor/1.4.3/ueditor.all.min.js"></script>
	<script type="text/javascript"
		src="lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
	<script type="text/javascript" src="lib/region/js/city-picker.data.js"></script>
	<script type="text/javascript" src="lib/region/js/city-picker.js"></script>
	<script type="text/javascript" src="lib/region/js/main.js"></script>
	<script type="text/javascript" src="js/uthinkjs/bonus.js?v=1.0"></script>
	<script type="text/javascript">
		
	</script>
</body>
</html>

